From e72520d5e408e546dd6f8388e7dc72cc432d3f49 Mon Sep 17 00:00:00 2001 From: Robert Lipe Date: Sun, 27 Oct 2019 03:05:33 -0500 Subject: [PATCH] Dev Doc fix: Document Qt, Qmake better. Better enumerate dependencies Describe Qt Crerator Improve internal linking Fix trailing spaces --- xmldoc/chapters/build.xml | 117 +++++++++++++++++++++++++++++--------- 1 file changed, 89 insertions(+), 28 deletions(-) diff --git a/xmldoc/chapters/build.xml b/xmldoc/chapters/build.xml index a9e243351..b5b1b1705 100644 --- a/xmldoc/chapters/build.xml +++ b/xmldoc/chapters/build.xml @@ -2,52 +2,110 @@ Getting or Building GPSBabel Downloading - the easy way. - -GPSBabel is distributed "ready to run" on most common -operating systems via the + +GPSBabel is distributed "ready to run" on most common +operating systems via the download page. As GPSBabel runs on a wide variety of operating systems, -be sure to visit the +be sure to visit the OS-Specific notes for additional information. Building from source. - - For operating systems where no binary is provided or if + + For operating systems where no binary is provided or if you want the latest development version, you will have to build it from source. The code should be compilable on any system with -ISO C++. It's tested on Linux, Mac OS/X, and Windows cross compilers. -Less frequently, someone will build on MSVC, FreeBSD, OpenBSD, Solaris, -etc. Both Clang/LLVM and GNU C++ are regularly exercised. +ISO C++14. It's tested on Linux, Mac OS/X, and Windows cross compilers. +Less frequently, someone will build on MSVC, FreeBSD, OpenBSD, Solaris, +etc. Both Clang/LLVM and GNU C++ are regularly exercised via automation. -You can grab a release from the GPSBabel download page, but if you're going to be doing any development, you'll find that working from the GPSBabel Github repo is easier. Checkouts vis Git, HTTPS, SSH, and Subversion are supported. +You can grab a release from the GPSBabel download page, but if you're going to be doing any development, you'll find that working from the GPSBabel Github repo is easier. Checkouts via Git, HTTPS, SSH, and Subversion are supported. +There are external requirements for bulding. + + + +Qt + + +Qt version 5.9 or newer is required for all builds. MacOS and Windows users can download +binaries from Qt Downloads +Fedora or CentOS users may need to 'yum install qt-devel'. Optionally, use qt5-base. When in doubt, 'yum search qt' or 'yum search qt5' may help you find the correct package name. Ubuntu users may need to 'apt-get install qtbase5-dev'. Package names +and versions in Linux frequently change, so you may need to ask your Linux vendor +for help or look in tools/Docker* for inspiration for our automated builds that +use Docker. + + + + + + + libusb + + + +is needed to communicate with use with older USB Garmins. +For MacOS, we use an included copy. +Fedora users may need to 'yum install libusb-devel'. Ubuntu users may +need to 'yum install libusb-dev' or look in tools/Docker* for inspiration +from our automated Docker builds. + + + + + +Brief history of internals + + Parts of GPSBabel have been public since 2002, with some of the original + design and original code came from 2001. It was originally in C89, not C++ + and while we strongly encourage modern C++ code where we can use it, we've + not gone back to those older formats - some of which we don't have + the hardware to test and have fallen out of touch with original authors - and + rewritten them in Modern C++ style. There are this void*'s everywhere, C String + use, gross buffer abuse, and other things that look more like a C program from the 80's than a C++ program of modern date. Code that's earned it's own wings can + continue to fly with us as long as it passes the tests we have. We've additionally + not enforced style rules as strongly across modules as we could have. Fixing + both of these is a goal for us in 2020. + + + + Building with Qt Creator + + Qt provides a lovely IDE (Integrated Development Evironment) with an + editor and debugger. Its use is strongly encouraged for those new to C++. + Once you have Qt correctly installed, just opening either the + GPSBabel.pro or gui/app.pro files from + the OS file launcher (e.g. a double click in MacOS while seeing it in Finder) + or from a File->Open in an already-running instance of Qt Creator is the fastest and easiest way for most + people to get to development because it handles things like build dependencies + changing and class and method compilation. + + A path of low resistance for some users is to use the Qt build files (*.pro) + and compiler chain, but use the command line. If you type qmake in our working + directory, it will build a "native" Build file (Makefile, XCode, Visual Studio) + which you can use for development. + + + + Building with configure - In most cases, the code is as simple to build as running: + Those familiar with UNIX-y open source packages may be more comfortable + with configure. In most cases, the code is as simple to build as running: ./configure && make - Qt -is required for all builds. Mac and Windows users can download -binaries from Qt Downloads -Fedora or CentOS users may need to 'yum install qt-devel'. Optionally, use qt5-base. When in doubt, 'yum search qt' or 'yum search qt5' can help you find the correct package name -Ubuntu users may need to 'apt-get install qtbase5-dev'. -Qt versions 5.2 and newer are supported. - - libusb -is recommended for OS/X and Linux if you want to use a USB Garmin or -DeLorme device. -Fedora users may need to 'yum install libusb-devel'. Ubuntu users may -need to 'yum install libusb-dev'. + + There are additional flags that can be passed to configure to - customize your build of GPSBabel. + customize your build of GPSBabel. -./configure --help +./configure --help lists all the supported options, but of interest we have: Excludes the shapefile support. @@ -58,9 +116,6 @@ lists all the supported options, but of interest we have: Excludes all filter support. - - Activate debugging mode for gpsbabel-debug. - dir Specifies that the doc should be created and installed in dir. @@ -70,5 +125,11 @@ lists all the supported options, but of interest we have: By default, we use our own version of zlib. If you specify the system zlib is used. A value of (or --without-zlib) disables zlib. + + There are some makefile targets that are useful mostly to the GPSBabel maintainers + that appear only in the configure-generated Makefiles. Their presence is considered + mostly a TODO bug and those items should be migrated to stand-alone tools. + + -- 2.30.2